/*
 * @Author: your name
 * @Date: 2021-01-04 17:27:11
 * @LastEditTime: 2021-01-05 14:36:25
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \myReposCode\Verification\e.cpp
 */
#include <cstdio>
#include <iostream>
#include <cstring>


void HelpMassage()
{
	FILE *fp;
	int size = 0;
	char *ar ;

	//二进制方式打开文件
	fp = fopen("testSDK.json","rb");
	if(NULL == fp)
	{
		printf("Error:Open input.c file fail!\n");
		return;
	}

	//求得文件的大小
	fseek(fp, 0, SEEK_END);
	size = ftell(fp);
	rewind(fp);

	//申请一块能装下整个文件的空间
	ar = (char*)malloc(sizeof(char)*size + 1 );
    memset(ar, 0, sizeof(char)*size + 1);

	//读文件
	fread(ar,1,size,fp);//每次读一个，共读size次

	printf("%s",ar);
	fclose(fp);
	free(ar);
}

void variftCharArray()
{
	char str[6] = {'h', 'e', 'l', 'l', 'o', '\0'};
	printf("str = %s\n", str);
}

int main()
{
    // HelpMassage();
	variftCharArray();
    return 0;
}